<template>
  <div style="border: 1px solid red; padding: 25px">子组件A
    <div>
      <!-- 子组件不需要写 @update="函数" -->
      <BCom v-bind="$attrs" v-on="$listeners" />
      <!-- 上面的写法就等价于下面写法， 自动给我们展开 -->
      <!-- <BCom :a="count" b="2" c="hello" @update="updateCount" /> -->
    </div>
  </div>
</template>

<script>
import BCom from './B.vue'

export default {
  name: 'A',
  components: { BCom },
  props: ['c'],
  data() {
    return {}
  },
  created() {
    console.log(this.$attrs, this.$listeners)
  }
}
</script>
